package com.oa.framework.org.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.oa.common.mybatis.typehandler.Boolean2Number;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 员工职务
 * @author cuichao
 */
@Getter
@Setter
@TableName("org_duty")
public class Duty {
    /**
     * 职务ID
     */
    @TableId(value = "duty_id", type = IdType.ASSIGN_ID)
    private Long dutyId;
    /**
     * 职务代码
     */
    @TableField(value = "duty_code" )
    private String dutyCode;
    /**
     * 职务名称
     */
    @TableField(value = "duty_name" )
    private String dutyName;
    /**
     * 职务对应职业Id
     */
    @TableField(value = "duty_post_id" )
    private Long postId;
    /**
     * 是否废弃
     */
    @TableField(value = "duty_disable" , typeHandler = Boolean2Number.class)
    private Boolean disable;
    /**
     * 职务说明
     */
    @TableField(value = "duty_description" )
    private String description;
    /**
     * 职务对应职业
     */
    @TableField(exist = false)
    private Position position;
    /**
     * 角色权限
     */
    @TableField(exist = false)
    private List<Permission> permissions;

}
